Component({
    properties: {},
    data: {
        numbers: [ {
            value: "",
            focus: !0
        }, {
            value: "",
            focus: !1
        }, {
            value: "",
            focus: !1
        }, {
            value: "",
            focus: !1
        }, {
            value: "",
            focus: !1
        }, {
            value: "",
            focus: !1
        }, {
            value: "",
            focus: !1
        }, {
            value: "",
            focus: !1,
            eco: !0
        } ]
    },
    methods: {
        click: function(e) {
            var u = e.target.dataset.index, t = this.data.numbers;
            t.forEach(function(e, t) {
                e.focus = t == u;
            }), this.setData({
                numbers: t
            }), this.triggerEvent("focus", u);
        },
        change: function(e) {
            var u = e.index, t = e.value, s = e.remove, a = this.data.numbers;
            a[u].value = s ? "" : t;
            var o = a.length, c = s ? u : u + 1;
            s && c < 0 && (c = o - 1), !s && c >= o && (c = 0), a.forEach(function(e, u) {
                e.focus = u == c;
            }), this.setData({
                numbers: a
            }), this.triggerEvent("focus", c);
        }
    }
});